<template>
  <div class="register-page">
    <m-header title="注册" :left-options="{showBack: true}"></m-header>
    <div class="form-wrapper">
      <div class="input-wrapper">
        <div class="left-img-wrapper"><img class="left-img" src="../../assets/imgs/login/my@2x.png" alt=""></div>
        <div class="divider"></div>
        <input placeholder="请输入6-11位且包含英文、数字 "/>
      </div>
      <div class="input-wrapper">
        <div class="left-img-wrapper"><img class="left-img" src="../../assets/imgs/login/lock@2x.png" alt=""></div>
        <div class="divider"></div>
        <div class=""><input :type="showPasswd?'':'password'" placeholder="请输入6-20位字母数字组合"/></div>
        <img v-if="!showPasswd" class="hidden-passwd" @click="showPasswd=!showPasswd" src="../../assets/imgs/login/闭眼@2x.png" alt="">
        <img v-else class="show-passwd" @click="showPasswd=!showPasswd" src="../../assets/imgs/login/眼睛@2x.png" alt="">
      </div>
      <div class="input-wrapper">
        <div class="left-img-wrapper"><img class="left-img" src="../../assets/imgs/login/分组_2@2x.png" alt=""></div>
        <div class="divider"></div>
        <input placeholder="请输入手机号"/>
      </div>
      <div class="input-wrapper">
        <div class="left-img-wrapper"><img class="left-img" src="../../assets/imgs/login/lock@2x.png" alt=""></div>
        <div class="divider"></div>
        <input class="short-input" placeholder="请输入验证码"/>
        <a class="get-code">获取验证码</a>
      </div>
      <div class="input-wrapper">
        <div class="left-img-wrapper"><img class="left-img" src="../../assets/imgs/login/朋友@2x.png" alt=""></div>
        <div class="divider"></div>
        <input placeholder="请输入介绍人（可不填）"/>
      </div>
      <div class="login-btn">注册</div>
      <div class="protocol-wrapper">
        注册代表你同意
        <a class="forget-passwd">《 用户协议 》</a>
      </div>
    </div>
  </div>
</template>
<script>
// import Attention from './Attention';
// import Fans from './Fans';

export default {
  components: {
    // Attention,
    // Fans
  },
  data () {
    return {
      tabIndex: 0,
      // currentView: [Attention, Fans],
      // tabList: ['关注', '粉丝']
      showPasswd: false
    }
  },
  created () {
    this.tabIndex = this.$route.query.type * 1 || 0;
  },
  methods: {
    handleTabClick (index) {
      this.tabIndex = index;
      this.$router.replace({name: 'Attention', query: { type: index }});
    }
  }
}
</script>
<style lang="less" scoped>
  @import '../../assets/styles/mixins.less';
  .register-page {
    .form-wrapper {
      position: relative;
      top: 2.7rem;
      .input-wrapper {
        margin: auto;
        margin-bottom: 0.3rem;
        border: 0.02rem solid #D2D2D2;
        width: 6.5rem;
        height: 1rem;
        border-radius: 0.5rem;
        display: flex;
        align-items:center;
        .left-img-wrapper {
          width: 0.44rem;
          margin-left: 0.52rem;
          .left-img {
            height: 0.44rem;
          }
        }
        .divider {
          height: 0.5rem;
          margin-left: 0.2rem;
          margin-right: 0.3rem;
          border-left: 0.01rem solid #D2D2D2;
        }
        input {
          font-size: 0.28rem;
          width: 4rem;
          height: 0.8rem;
          margin-right: 0.2rem;
        }
        .short-input {
          width: 3.2rem;
          margin-right: 0.2rem;
        }
        .hidden-passwd {
          width: 0.44rem;
          height: 0.21rem;
        }
        .show-passwd {
          width: 0.44rem;
          height: 0.37rem;
        }
        .get-code {
          color: #D44743;
          font-size: 0.24rem;
        }
      }
      .login-btn {
        margin: auto;
        margin-top: 0.6rem;
        margin-bottom: 1.86rem;
        width: 6.5rem;
        height: 1rem;
        line-height: 1rem;
        text-align: center;
        border-radius: 0.5rem;
        background-color: #D44743;
        color: #FFFFFF;
        font-size: 0.34rem;
      }
      .protocol-wrapper {
        text-align: center;
        color: #999999;
        font-size: 0.28rem;
        a {
          color: #D44743;
        }
      }
    }

  }

</style>
